{extend name="panel/layout" /}
{block name="main"}
<div class="row">
    <div class="col-md-12">
        <div class="widget">
            <header class="widget-header">
                <h4 class="widget-title">签到规则
                </h4>
            </header><!-- .widget-header -->
            <hr class="widget-separator">
            <div class="widget-body">
                <div class="alert alert-warning" role="alert"><i class="fa fa-exclamation"></i>&nbsp;每日前{$num}名签到的人至少可以获得{$rule[1]}元奖励！
                </div>
                <div class="alert alert-info">
                    <div class="progress">
                        <div class="progress-bar progress-bar-warning" style="width: {$day * 10}%;"></div>
                    </div>
                    <div class="text-center">我已连续签到 <strong>{$day}</strong>天！</div>
                </div>
                <div class="list-group-item">
                    <form class="form-horizontal" method="post">
                        {if condition="$isQd"}
                        <span class="btn btn-warning btn-block">今天已签到</span>
                        {else}
                        <button class="btn btn-primary btn-block">签到</button>
                        {/if}
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-12">
        <div class="widget">
            <header class="widget-header">
                <h4 class="widget-title">签到记录
                </h4>
            </header><!-- .widget-header -->
            <hr class="widget-separator">
            <div class="widget-body table-responsive">
                <table class="table table-hover table-striped">
                    <thead>
                    <tr>
                        <th class="text-center">UID</th>
                        <th class="text-center">用户名</th>
                        <th class="text-center">连续天数</th>
                        <th class="text-center">签到时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="$qdList" id="qd"}
                    <tr>
                        <td class="text-center">{$qd.uid}</td>
                        <td class="text-center">{$qd.user}</td>
                        <td class="text-center">{$qd.num}</td>
                        <td class="text-center">{$qd.qdtime}</td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
</div>
{/block}